﻿using System;
using System.Collections.Generic;

namespace housingsafety.server.Repository
{
    /// <summary>
    /// 分页列表
    /// </summary>
    public class PagePc<T>
    {
        public PagePc()
        {

        }
        public PagePc(List<T> items, int pageIndex, int pageSize, int totalCount, int yccbcz, int yzc,int wzc,int yjc,int wjc)
        {
            NextPageIndex = pageIndex;
            PageSize = pageSize;
            Total = totalCount;
            PageTotal = (int)Math.Ceiling(totalCount / (double)pageSize);
            Items = items;
            Yzc = yzc;
            Wzc = wzc;
            Yjc = yjc;
            Wjc = wjc;
            Yccbcz = yccbcz;
        }

        public PagePc(List<T> items, int pageIndex, int pageSize, int totalCount)
        {
            NextPageIndex = pageIndex;
            PageSize = pageSize;
            Total = totalCount;
            PageTotal = (int)Math.Ceiling(totalCount / (double)pageSize);
            Items = items;
        }

        /// <summary>
        /// 下一页页码
        /// </summary>
        public int NextPageIndex { get; set; }

        /// <summary>
        /// 每页记录数
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 总记录数
        /// </summary>
        public int Total { get; set; }

        /// <summary>
        /// 总页数
        /// </summary>
        public int PageTotal { get; set; }

        /// <summary>
        /// 分页数据
        /// </summary>
        public List<T> Items { get; set; }

        public int Yzc { get; set; }
        public int Wzc { get; set; }
        public int Yjc { get; set; }
        public int Wjc { get; set; }

        public int Yccbcz { get; set; }
    }
}
